from swarm import Swarm, Agent
from openai import OpenAI, Stream

a=[{"id":"1","name":"a"},{"id":"2","name":"b"}]
b=[{"id":"3","name":"c"},{"id":"1","name":"a"}]
main = []
main.append(a)
main.append(b)
print(main)
main["id"]
merged_dict = {**a, **b}
print(merged_dict)
# openai = OpenAI(api_key="28db6a031d27b1b6815df9f9fade5392.b2O8X4Z7v5z6s6lv", base_url="https://open.bigmodel.cn/api/paas/v4/")
# client = Swarm(client=openai)
#
# def transfer_to_agent_b():
#     return agent_b
#
#
# agent_a = Agent(
#     name="Agent A",
#     model="glm-4-plus",
#     instructions="You are a helpful agent.",
#     functions=[transfer_to_agent_b],
# )
#
# agent_b = Agent(
#     name="Agent B",
#     model="glm-4-plus",
#     instructions="Only speak in Haikus.",
# )
#
# response = client.run(
#     agent=agent_b,
#     messages=[{"role": "user", "content": "I want to talk to agent B."}],
# )
#
# print(response.messages[-1]["content"])